home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / earcd / mus / play / splibdev.lha / superplay-lib_DEV / Programmers / include / spobjects / spobjects.h < prev   
C/C++ Source or Header  |  1997-04-03  |  4KB  |  111 lines

  1. /*
  2. **      $VER: spobjects.h 5.1 (8.8.96)
  3. **
  4. **      main include file for SPObject programming
  5. **
  6. **      (C) Copyright 1994-96 Andreas R. Kleinert
  7. **      All Rights Reserved.
  8. */
  9.  
  10. #ifndef SPOBJECTS_SPOBJECTS_H
  11. #define SPOBJECTS_SPOBJECTS_H
  12.  
  13. #define SVO_LIB_MINIMUM 3 /* lowest supported version */
  14. #define SVO_LIB_VERSION 3 /* just for information     */
  15.  
  16. struct SPO_ObjectNode
  17. {
  18.  struct Node spo_Node;            /* chaining Node                 */
  19.  
  20.  ULONG spo_Version;            /* Library-Version of spobject         */
  21.  
  22.  ULONG spo_ObjectType;            /* see below                 */
  23.  
  24.  UBYTE spo_FileName [108];        /* use 30, as in struct FileInfoBlock    */
  25.  
  26.  UBYTE spo_TypeID      [32];        /* e.g. "MED"                            */
  27.  ULONG spo_TypeCode;            /* ... and its appropriate Code,  ,      */
  28.                     /* assigned by superplay.library LATER.  */
  29.  
  30.  ULONG spo_SubTypeNum;            /* actually available SubTypes         */
  31.                     /* (maximum 16) of the spobject.         */
  32.  
  33.  UBYTE spo_SubTypeID   [16][16];    /* e.g. "MMD0" or "MMD1"                 */
  34.  ULONG spo_SubTypeCode [16];        /* ... and their appropriate Codes,      */
  35.                     /* assigned by superplay.library LATER.  */
  36.  
  37.  ULONG spo_BackgroundReplay;        /* Runs in the Background ? (Boolean)    */
  38.  
  39.  /* may grow dependent on spo_Version */
  40. };
  41.  
  42. #define SPO_VERSION (3)
  43.  
  44.  
  45.  /* ^ DO NOT USE THIS DEFINE IN SOURCECODE !  */
  46.  /*   AVOID INCREASING IT VIA RECOMPILATION ! */
  47.  
  48. #define SPO_OBJECTTYPE_NONE    ((ULONG) 0)
  49. #define SPO_OBJECTTYPE_UNKNOWN SPO_OBJECTTYPE_NONE
  50. #define SPO_OBJECTTYPE_ILLEGAL ((ULONG) 0xFFFFFFFF)
  51.  
  52. #define SPO_OBJECTTYPE_SAMPLE       ((ULONG) 1) /* Raw Sample                 */
  53. #define SPO_OBJECTTYPE_MODULE       ((ULONG) 2) /* Specific Sound Module      */
  54.  
  55.  /* There may be more types in the future : simply reject unknown types. */
  56.  
  57.  
  58.  /* ----------------------------------------------------------------------- */
  59.  
  60. struct SPO_SampleList        /* Header of "SampleEntry"-List */
  61. {
  62.  struct List sl_EntryList;   /* List itself                  */
  63.  
  64.  ULONG       sl_NumEntries;  /* number of entries in List    */
  65. };
  66.  
  67. struct SPO_SampleEntry       /* may e.g. contain SampleData  */
  68. {
  69.  struct Node             se_Node;          /* the chaining Node           */
  70.  
  71.  ULONG                   se_Version;       /* SPObject's Version (2)      */
  72.  
  73.  ULONG                   se_Type;          /* Sample ?                    */
  74.  
  75.  /* The following entries are only valid, if se_Type is == SE_TYPE_SAMPLE */
  76.  
  77.  UBYTE                  *se_SampleBuffer;  /* SampleData (CHIP-Ram)       */
  78.  ULONG                   se_SampleSize;    /* size of SampleData in Bytes */
  79.  
  80.  ULONG                   se_SampleBits;    /* 8, 16                       */
  81.  ULONG                   se_SamplesPerSec; /* as needed with audio.device */
  82.  ULONG                   se_Volume;        /* as needed with audio.device */
  83.  
  84.  /* more entries may follow in the future */
  85. };
  86.  
  87. #define SE_TYPE_NONE    ((ULONG) 0)
  88. #define SE_TYPE_UNKNOWN SE_TYPE_NONE
  89. #define SE_TYPE_ILLEGAL ((ULONG) 0xFFFFFFFF)
  90.  
  91. #define SE_TYPE_SAMPLE    ((ULONG) 1) /* Entry contains Sample Data */
  92.  
  93.  /* There may be more types in the future : simply reject unknown types.
  94.     Do not examine unknown SampleEntry-Types. They may contain data,
  95.     which is structured different from the above in the future !
  96.  */
  97.  
  98.  
  99.  /* This structure has to be passed to SPObject's SPO_CheckFileType()
  100.     function, if media other than SPO_MEDIUM_DISK are used for reading.
  101.   */
  102.  
  103. struct SPOCheckFile
  104. {
  105.  ULONG spc_Medium;   /* SPO_MEDIUM_... */
  106.  
  107.  ULONG spc_Future;   /* as usual       */ 
  108. };
  109.  
  110. #endif /* SPOBJECTS_SPOBJECTS_H */
  111.